package com.l024.framework.utils;

/**
 * @author wu_ming_zhi_bei
 * @date 2020/2/17 10:17
 * @Notes 时间转换工具类
 */
public class TimeUtils {

    /**
     * 转换毫秒格式
     * ls = 1000ms
     * 1min = 60s
     * 1h = 60 min
     * 1d = 24h
     */
    public static String formatDuring(long ms){
        long hours = (ms%(1000*60*60*24))/(1000*60*60);
        long minutes = (ms%(1000*60*60))/(1000*60);
        long seconds = (ms%(1000*60))/(1000);
        return hours+":"+minutes+":"+seconds;
    }
}
